package com.dog.basics.bean.dto.admin.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;


@Data
@ApiModel(value = "添加文章")
public class ArticleAddDto {

    /**
     * 文章标题
     */
    @ApiModelProperty(value = "文章标题", dataType = "String", required = true)
    @NotBlank(message="文章标题不能为空")
    @Size(min = 1,max = 255,message = "文章标题规范长度1-255")
    private String title;

    /**
     * 文章分类id
     */
    @ApiModelProperty(value = "文章分类id", dataType = "Long", required = true)
    @NotNull(message="文章分类id不能为空")
    private Long classId;

    /**
     * 文章短标题
     */
    @ApiModelProperty(value = "文章短标题", dataType = "String")
    @Size(min = 1,max = 50,message = "文章短标题规范长度1-50")
    private String shortTitle;

    /**
     * 文章来源
     */
    @ApiModelProperty(value = "文章来源", dataType = "String")
    @Size(min = 1,max = 50,message = "文章来源规范长度1-50")
    private String source;

    /**
     * 文章来源链接
     */
    @ApiModelProperty(value = "文章来源链接", dataType = "String")
    @Size(min = 1,max = 255,message = "文章来源链接规范长度1-50")
    private String url;

    /**
     * 文章作者
     */
    @ApiModelProperty(value = "文章作者", dataType = "String")
    @Size(min = 1,max = 50,message = "文章作者规范长度1-50")
    private String author;

    /**
     * 文章摘要
     */
    @ApiModelProperty(value = "文章摘要", dataType = "String")
    @Size(min = 1,max = 140,message = "文章摘要规范长度1-140")
    private String summary;

    /**
     * 文章正文
     */
    @ApiModelProperty(value = "文章正文", dataType = "String", required = true)
    @NotBlank(message ="文章正文不能为空" )
    private String content;

    /**
     * 文章标题图片
     */
    @ApiModelProperty(value = "文章标题图片", dataType = "String",required = true)
    @NotBlank(message ="文章标题图片不能为空" )
    private String image;

    /**
     * 文章关键字
     */
    @ApiModelProperty(value = "文章关键字", dataType = "String")
    @Size(min = 1,max = 255,message = "文章关键字规范长度1-140")
    private String keyword;

    /**
     * 相关文章id
     */
    @ApiModelProperty(value = "相关文章id", dataType = "List<String>")
    private List<String> articleIdArrayList;

    /**
     * 文章排序0-255
     */
    @ApiModelProperty(value = "文章排序0-255", dataType = "Integer")
    private Integer sort;

    /**
     * 文章是否标志 0是 1否
     */
    @ApiModelProperty(value = "文章是否标志 0是 1否", dataType = "Integer")
    private Integer commendFlag;

    /**
     * 是否允许评论 0是 1否
     */
    @ApiModelProperty(value = "是否允许评论 0是 1否", dataType = "Integer")
    private Integer commentFlag;

    /**
     * 0-草稿、1-待审核、2-已发布、-1-回收站
     */
    @ApiModelProperty(value = "0-草稿、1-待审核", dataType = "Integer",required = true)
    @NotNull(message = "文章状态不能为空")
    private Integer status;

    /**
     * 文章附件路径
     */
    @ApiModelProperty(value = "文章附件路径", dataType = "attachmentPathList")
    private List<String> attachmentPathList;

    /**
     * 文章标签
     */
    @ApiModelProperty(value = "文章标签", dataType = "String")
    @Size(min = 1,max = 100,message = "文章标签规范长度1-140")
    private String tag;
}


